package com.jiyun.home.controller;


import com.jiyun.common.pojo.home.JiGou;
import com.jiyun.home.service.JiGouService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/jigou")
@CrossOrigin
public class JiGouController {
    @Autowired
    private JiGouService jiGouService;
    @RequestMapping("/findAll")
    public List<JiGou> findAll(){
        List<JiGou> jiGouList = jiGouService.findAll();
        return jiGouList;
    }
}
